<?php
declare (strict_types = 1);

namespace app\validate;

use think\Validate;

class UserAddress extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule =   [
        'name'  => 'require',
        'phone'   => 'require',
        'province_region' => 'require',
        'city_region' => 'require',
        'district_region' => 'require',
        'detailed_address' => 'require',
    ];

    protected $message  =   [
        'name.require' => '收货人必须',
        'phone.require' => '手机号必须',
        'province_region.require' => '地区省必须',
        'city_region.require' => '城市必须',
        'district_region.require' => '区县必须',
        'name.detailed_address' => '详细地址必须',
    ];
}
